import {
	request
} from './request.js'

//登录
export const login = data => request({
	url: '/user/mLogin',
	method: 'post',
	data
})

//获取用户信息
export const getUserInfo = data => request({
	url: '/user/getUserInfo',
	method: 'get',
	data
})

//获取菜单
export const getMenuDetails = data => request({
	url: '/menu/getMenuDetails',
	data
})

//获取商品详情
export const getMenu = data => request({
	url: '/menu/getMenu',
	data
})

//提交订单
export const addOrder = data => request({
	url: '/order/addOrder',
	method: 'post',
	data
})

//查询订单列表
export const getOrderList = data => request({
	url: '/order/getOrderList',
	method: 'get',
	data
})

//查询订单详情
export const getOrderDetails = data => request({
	url: '/order/getOrderDetails',
	method: 'get',
	data
})

//获取推荐菜单
export const getRecommend = data => request({
	url: '/menu/getRecommend',
	method: 'get',
	data
})

//获取轮播图
export const getCarousel = data => request({
	url: '/other/getCarousel',
	method: 'get',
	data
})

//充值
export const addRecharge = data => request({
	url: '/recharge/addRecharge',
	method: 'post',
	data
})

//修改用户信息
export const editUser = data => request({
	url: '/user/editUser',
	method: 'post',
	data
})

//修改密码
export const editPassword = data => request({
	url: '/user/mEditPassword',
	method: 'post',
	data
})